import request from '/@/utils/request';

export function CartApi() {
	return {
		view: (id: string) => {
			return request({
				url: `management/cart/view/${id}`,
				method: 'GET',
			});
		},

		delete: (id: string) => {
			return request({
				url: `management/cart/delete/${id}`,
				method: 'delete',
			});
		},

		search: (data: object) => {
			return request({
				url: 'management/cart/search',
				method: 'POST',
				data,
			});
		},
	};
}
